package com.ants.modules.ArticleManage.service;

import com.ants.modules.ArticleManage.dto.ArticleManageDto;
import com.ants.modules.ArticleManage.entity.ArticleManage;
import com.ants.modules.ArticleManage.vo.ArticleManageVo;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
 * TODO
 * Author Chen
 * Date   2021/9/7 18:44
 */
public interface ArticleManageService extends IService<ArticleManage> {

    List<ArticleManageDto> getAllList();

    List<ArticleManageVo> initArticleLable(String username);

    List<Map<String, Object>> articleGroupByCreateTime(String username);

    List<ArticleManage> getArticleByTime(String time, String username);

    void updateIsIncluded(String isIncluded, String id);

    List<Map<String, Object>> articleStatisticsLineChart(String username, String startTime, String endTime, String otherSql);

    List<Map<String, Object>> sortStatisticsChart();

    int getViewNumSum(String username);

    List<Map<String, Object>> getArticleTop5ByViewNum();

    List<Map<String, Object>> getSortTop5();

    List<Map<String, Object>> recommend();

    Map<String, String> getUserInfoByArticleId(String id);

    ArticleManageDto getArticleToESById(String id);

    List<Map<String, Object>> getWxMyLikesArticle(String username, Integer offset);

    List<Map<String, Object>> getWxMyCollectArticle(String username, Integer offset);
    /**
     * 修改阅读数
     */
    void updateViewsNum(String id);

    Integer beLiked(String username);

    List<ArticleManageDto> getPersonMyFavoritesList(String username, Integer offset, int pageSize);

    List<ArticleManageDto> getPersonLikeList(String username, Integer offset, int pageSize);

    List<ArticleManageDto> getArticleByUser(String username, Integer offset, int pageSize);

    List<Map<String, Object>> queryHotSortBySize(Integer pageSize);

    Boolean updateArticleDelFlag(String id, int delFalg);

    List<ArticleManageDto> getArticleAllByUser(String username);

    Integer getArticleLikeNumByUserNmae(String username);

    Integer getArticleFavoritesNumByUserNmae(String username);
}
